package com.ah.shanxi_demo.param.result;

import com.ah.shanxi_demo.common.enums.OrderTypeEnum;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;

/**
 * @author zt 2020/8/25
 */
public class OrderTypeRO implements Serializable {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer type;

    private String name;

    private Integer value;

    public Integer getType() {
        return null;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        if (type==null){
            return OrderTypeEnum.ORDER_TYPE_1.getValue();
        }

        return OrderTypeEnum.convert(type.toString()).getValue();
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
}
